package com.xbn.xbnmall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xbn.common.exception.PasswordErrorException;
import com.xbn.common.exception.PhoneExistException;
import com.xbn.common.exception.UserNotFindException;
import com.xbn.common.exception.UsernameExistException;
import com.xbn.common.to.MemberRegistTo;
import com.xbn.common.utils.PageUtils;
import com.xbn.xbnmall.member.entity.MemberEntity;
import com.xbn.xbnmall.member.vo.UserLoginVo;
import com.xbn.xbnmall.member.vo.WeiboUserToken;

import java.util.Map;

/**
 * 会员
 *
 * @author XBN
 * @email 78742541@qq.com
 * @date 2020-06-27 13:45:57
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void regist(MemberRegistTo memberRegistTo);
    void  checkUsernameUnique(String username) throws UsernameExistException;
    void checkPhoneUnique(String phone) throws PhoneExistException;

    MemberEntity login(UserLoginVo userLoginVo) throws UserNotFindException
            , PasswordErrorException;
    MemberEntity login(WeiboUserToken weiboUserToken) throws Exception;
}

